From 3d1c871b8d92fcabb41ba653c4a39d87c1d80aa2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 22 Sep 2025 23:48:46 -0400 Subject: [PATCH] worse --- ..._9b3b7d6af9add0e8d6cb3e59b2768ff1._comment | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/bugs/annex_import_doesn__39__t_delete_files_during_updates/comment_2_9b3b7d6af9add0e8d6cb3e59b2768ff1._comment diff --git a/doc/bugs/annex_import_doesn__39__t_delete_files_during_updates/comment_2_9b3b7d6af9add0e8d6cb3e59b2768ff1._comment b/doc/bugs/annex_import_doesn__39__t_delete_files_during_updates/comment_2_9b3b7d6af9add0e8d6cb3e59b2768ff1._comment new file mode 100644 index 0000000000..b9304aaff6 --- /dev/null +++ b/doc/bugs/annex_import_doesn__39__t_delete_files_during_updates/comment_2_9b3b7d6af9add0e8d6cb3e59b2768ff1._comment @@ -0,0 +1,28 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2025-09-23T03:41:09Z" + content=""" +In just the right circumstance, this can also prevent import from +adding files. If an export deleted a file, and then it was written back to +the special remote, in a way that caused it to have an identical content +identifier, then import would see no change when diffing, and so would not +add the file back. + +With the directory special remote, the way to trigger this is: + + git rm foo + git commit -m rm + mv ../directory/foo .. + git-annex export master --to remote + mv ../foo ../directory/foo + git-annex import master --from remote + git merge remote/master + +The `mv` is needed to preserve the inode, which is used in the content +identifier. + +With other types of special remotes that have less good content +identifiers, it might suffice for the same content to be written to the +special remote. +"""]] -- 2.30.2